/*
 * Copyright (c) 2011 OECP All Rights Reserved.                	
 * <a href="http://www.oecp.cn">http://www.oecp.cn</a>                                                                 
 */    

package com.topdt.jbpm.jpdl.draw;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import javax.imageio.ImageIO;



/**
 *
 * @author yangtao
 * @date 2011-9-30上午09:26:14
 * @version 1.0
 */
public class Test {

	public static void main(String[] args) {
		System.out.println("-------------------------");
		try { File file = new File("F:/jbpm-space/topdt-jbpm/test/com/topdt/jbpm/service/concurrence.jpdl.xml");
		InputStream is = new FileInputStream(file);
		JpdlModel jpdlModel = new JpdlModel (is);
		ImageIO.write(new JpdlModelDrawer().draw(jpdlModel), "png", new File("D:/concurrence.png"));
		}
		catch (FileNotFoundException e) {
		e.printStackTrace(); }
		catch (IOException e) {
		e.printStackTrace(); }
		catch (Exception e) {
		e.printStackTrace(); }
		}


}
